/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
  const { router, controller, middleware } = app;
  const adminAuth = middleware.adminAuth();

  router.post("/api/insertUser", controller.home.insertUser);
  router.post("/api/login", controller.home.login);
  router.post("/api/sendEmailCode", controller.home.sendEmailCode);
  router.post("/api/resetPassword", controller.home.resetPassword);
  router.post("/api/log", controller.home.log);
  router.get("/api/queryUser", adminAuth, controller.home.queryUser);
  router.post("/api/massEmail", adminAuth, controller.home.massEmail);
  router.get("/api/queryEmail", adminAuth, controller.home.queryEmail);

};
